Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring #29

Merged
merged 9 commits into from
Dec 3, 2018
Merged

Refactoring #29

merged 9 commits into from
Dec 3, 2018

Conversation

Rexarrior
Copy link
Contributor

@Rexarrior Rexarrior commented Nov 26, 2018

Pull Request

Рефакторинг с целью оптимизации и интеграция решения второй задачи.

Описание

Механизм взаимодействия с базой данных переписан с целью универсализации и повышения гибкости.
Добавлен инструмент для заполнения базы из файлов json и jsonlines.
Модели данных соответствуют описанным в issue.

Выполнено разбиение файла ksrf_models на несколько файлов, по одному на каждую модель.
Добавлено несколько сущностей в all в init
Добавлено несколько вариантов функции Initialize в init

Тестовый план

С помощью этого кода выполнена загрузка новых файлов в бд. Ошибок не выявлено.
В случае проведения дополнительного тестирования рекомендуется посмотреть на примеры использования

Связанные задачи

DatabaseWrapper.put_data теперь может использоваться для решения задач по обновлению\установке атрибутов ( #9)
Часть решения этой задачи
Поддержка формата jsonlines решает проблему слишком больших данных. Проверено на объеме в 8 гб. (closes #25 )

@Rexarrior Rexarrior added type/code maintenance New feature/requirement that focuses on improving architecture, realization and code style priority/high High issue priority labels Nov 26, 2018
@Rexarrior Rexarrior added this to In progress in Веб-краулер via automation Nov 26, 2018
web_crawler/models/DatabaseWrapper.py Outdated Show resolved Hide resolved
web_crawler/models/KSRFSource.py Show resolved Hide resolved
web_crawler/models/KSRFSource.py Show resolved Hide resolved
web_crawler/models/LocalFileStorageSource.py Show resolved Hide resolved
web_crawler/tools.py Outdated Show resolved Hide resolved
web_crawler/tools.py Outdated Show resolved Hide resolved
web_crawler/tools.py Outdated Show resolved Hide resolved
Веб-краулер automation moved this from In progress to Need to review Nov 26, 2018
Vasar007 and others added 5 commits November 26, 2018 20:37
Co-Authored-By: Rexarrior <Rexarrior@yandex.ru>
Co-Authored-By: Rexarrior <Rexarrior@yandex.ru>
Remove redundand brackets
add TODO comment
Add with expression
@Rexarrior Rexarrior merged commit dd3b8c9 into IntenseWeek Dec 3, 2018
Веб-краулер automation moved this from Need to review to Done Dec 3, 2018
@Rexarrior Rexarrior deleted the Refactoring branch February 2, 2019 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/high High issue priority type/code maintenance New feature/requirement that focuses on improving architecture, realization and code style
Projects
Development

Successfully merging this pull request may close these issues.

Прикрутить json streamer
2 participants